package com.weixinli.beans;

import java.io.Serializable;

public class UserComment implements Serializable{
	private int cid;//评论编号
	private int area_id;//评论区域编号
	private int w_uid;//评论人编号
	private int objid;//评论对象编号
	private String ccontent;//评论内容
	private String ctime;//评论时间
	private String temp;//备用字段
	private String userPhoto;  //备用字段  用于存用户头像
	
	private int min;
	private int max;
	
	private static final long serialVersionUID = 1L;
	
	@Override
	public String toString() {
		return "UserComment [cid=" + cid + ", area_id=" + area_id + ", w_uid=" + w_uid + ", objid=" + objid
				+ ", ccontent=" + ccontent + ", ctime=" + ctime + ", temp=" + temp + ", userPhoto=" + userPhoto
				+ ", min=" + min + ", max=" + max + "]";
	}

	public int getMin() {
		return min;
	}

	public void setMin(int min) {
		this.min = min;
	}

	public int getMax() {
		return max;
	}

	public void setMax(int max) {
		this.max = max;
	}

	public int getCid() {
		return cid;
	}

	public void setCid(int cid) {
		this.cid = cid;
	}

	public int getArea_id() {
		return area_id;
	}

	public void setArea_id(int area_id) {
		this.area_id = area_id;
	}

	public int getW_uid() {
		return w_uid;
	}

	public void setW_uid(int w_uid) {
		this.w_uid = w_uid;
	}

	public int getObjid() {
		return objid;
	}

	public void setObjid(int objid) {
		this.objid = objid;
	}

	public String getCcontent() {
		return ccontent;
	}

	public void setCcontent(String ccontent) {
		this.ccontent = ccontent;
	}

	public String getCtime() {
		return ctime;
	}

	public void setCtime(String ctime) {
		this.ctime = ctime;
	}

	public String getTemp() {
		return temp;
	}

	public void setTemp(String temp) {
		this.temp = temp;
	}

	public String getUserPhoto() {
		return userPhoto;
	}

	public void setUserPhoto(String userPhoto) {
		this.userPhoto = userPhoto;
	}

	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + area_id;
		result = prime * result + ((ccontent == null) ? 0 : ccontent.hashCode());
		result = prime * result + cid;
		result = prime * result + ((ctime == null) ? 0 : ctime.hashCode());
		result = prime * result + max;
		result = prime * result + min;
		result = prime * result + objid;
		result = prime * result + ((temp == null) ? 0 : temp.hashCode());
		result = prime * result + ((userPhoto == null) ? 0 : userPhoto.hashCode());
		result = prime * result + w_uid;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UserComment other = (UserComment) obj;
		if (area_id != other.area_id)
			return false;
		if (ccontent == null) {
			if (other.ccontent != null)
				return false;
		} else if (!ccontent.equals(other.ccontent))
			return false;
		if (cid != other.cid)
			return false;
		if (ctime == null) {
			if (other.ctime != null)
				return false;
		} else if (!ctime.equals(other.ctime))
			return false;
		if (max != other.max)
			return false;
		if (min != other.min)
			return false;
		if (objid != other.objid)
			return false;
		if (temp == null) {
			if (other.temp != null)
				return false;
		} else if (!temp.equals(other.temp))
			return false;
		if (userPhoto == null) {
			if (other.userPhoto != null)
				return false;
		} else if (!userPhoto.equals(other.userPhoto))
			return false;
		if (w_uid != other.w_uid)
			return false;
		return true;
	}

	public UserComment(int cid, int area_id, int w_uid, int objid,
			String ccontent, String ctime, String temp, String userPhoto) {
		super();
		this.cid = cid;
		this.area_id = area_id;
		this.w_uid = w_uid;
		this.objid = objid;
		this.ccontent = ccontent;
		this.ctime = ctime;
		this.temp = temp;
		this.userPhoto = userPhoto;
	}

	public UserComment() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	
}
